import request from '@/utils/request'


export const listAll = (data) => request.get({
	url: '/business/voteInfo/front/list',
	data
})
export const listUserAll = (data) => request.get({
	url: '/business/voteInfo/userList',
	data
})

export const findById = (data) => request.get({
	url: `/business/voteInfo/${data}`,
})
export const addVoteRecord = (data) => request.post({
	url: `/business/voteRecord`,
	data
})
export const editVoteRecord = (data) => request.put({
	url: `/business/voteRecord`,
	data
})
export const listVoteOptoin=(data)=>request.get({
	url:`/business/voteOption/listWithTitle`,
	data
})
//用户统计
export const countVotesByUserId=()=>request.get({
	url:`/business/frontUserVoteRecord/countVotesByUserId`,
})
export const countVotesStatusByUserId=(data)=>request.get({
	url:`/business/frontUserVoteRecord/countVotesStatusByUserId/${data}`,
})
export const getVoteResult=(data)=>request.get({
	url:`/business/voteInfo/front/${data}`
})